<?php
class Series extends AppModel {
	var $name = 'OrdersSeries';
	var $displayField = 'id';
	var $validate = array(
		'report_type' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => 'Select report type',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'date_from' => array(
			'date' => array(
				'rule' => array('date','mdy'),
		        'message' => 'Enter a valid date in MM-DD-YYYY format.',
		        'allowEmpty' => false
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'date_to' => array(
			'date' => array(
				'rule' => array('date','mdy'),
		        'message' => 'Enter a valid date in MM-DD-YYYY format.',
		        'allowEmpty' => false
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	var $belongsTo = array(
		'Orders' => array(
			'className' => 'Orders',
			'foreignKey' => 'orders_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Employee' => array(
			'className' => 'Employee',
			'foreignKey' => 'employee_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
}
?>